<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cpp_redis: cpp_redis::sentinel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="cpp_redis_logo.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">cpp_redis
   &#160;<span id="projectnumber">4.0.0</span>
   </div>
   <div id="projectbrief">cpp_redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>cpp_redis</b></li><li class="navelem"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcpp__redis_1_1sentinel-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cpp_redis::sentinel Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="sentinel_8hpp_source.html">sentinel.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel_1_1sentinel__def.html">sentinel_def</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ae1a150ff8787208c47414397a061c9a7"><td class="memItemLeft" align="right" valign="top">typedef std::function&lt; void(<a class="el" href="classcpp__redis_1_1reply.html">reply</a> &amp;)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a></td></tr>
<tr class="separator:ae1a150ff8787208c47414397a061c9a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a923e06b5b700c16dffec8a01d2fa9aa4"><td class="memItemLeft" align="right" valign="top">typedef std::function&lt; void(<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a923e06b5b700c16dffec8a01d2fa9aa4">sentinel_disconnect_handler_t</a></td></tr>
<tr class="separator:a923e06b5b700c16dffec8a01d2fa9aa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2ea5a80a9139d5192706988521a2ae34"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a2ea5a80a9139d5192706988521a2ae34">sentinel</a> (void)</td></tr>
<tr class="memdesc:a2ea5a80a9139d5192706988521a2ae34"><td class="mdescLeft">&#160;</td><td class="mdescRight">ctor &amp; dtor  <a href="#a2ea5a80a9139d5192706988521a2ae34">More...</a><br /></td></tr>
<tr class="separator:a2ea5a80a9139d5192706988521a2ae34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af53665f5834dfe5861a6310318ae5169"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#af53665f5834dfe5861a6310318ae5169">sentinel</a> (const std::shared_ptr&lt; <a class="el" href="classcpp__redis_1_1network_1_1tcp__client__iface.html">network::tcp_client_iface</a> &gt; &amp;tcp_client)</td></tr>
<tr class="separator:af53665f5834dfe5861a6310318ae5169"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8535e89714db8ddcd7e74337ee5385a"><td class="memItemLeft" align="right" valign="top"><a id="af8535e89714db8ddcd7e74337ee5385a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#af8535e89714db8ddcd7e74337ee5385a">~sentinel</a> (void)</td></tr>
<tr class="memdesc:af8535e89714db8ddcd7e74337ee5385a"><td class="mdescLeft">&#160;</td><td class="mdescRight">dtor <br /></td></tr>
<tr class="separator:af8535e89714db8ddcd7e74337ee5385a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c3b68f6e930b2e9723816bb8bed5a8f"><td class="memItemLeft" align="right" valign="top"><a id="a4c3b68f6e930b2e9723816bb8bed5a8f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a4c3b68f6e930b2e9723816bb8bed5a8f">sentinel</a> (const <a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;)=delete</td></tr>
<tr class="memdesc:a4c3b68f6e930b2e9723816bb8bed5a8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">copy ctor <br /></td></tr>
<tr class="separator:a4c3b68f6e930b2e9723816bb8bed5a8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06b8d049160e3990cdac3158aaf160a6"><td class="memItemLeft" align="right" valign="top"><a id="a06b8d049160e3990cdac3158aaf160a6"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a06b8d049160e3990cdac3158aaf160a6">operator=</a> (const <a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;)=delete</td></tr>
<tr class="memdesc:a06b8d049160e3990cdac3158aaf160a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">assignment operator <br /></td></tr>
<tr class="separator:a06b8d049160e3990cdac3158aaf160a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0df522dbd7debda4e73f616a62d6f5ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a0df522dbd7debda4e73f616a62d6f5ee">send</a> (const std::vector&lt; std::string &gt; &amp;sentinel_cmd, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;callback=nullptr)</td></tr>
<tr class="separator:a0df522dbd7debda4e73f616a62d6f5ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4f85d486499f82225b244f85091b31e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#ad4f85d486499f82225b244f85091b31e">commit</a> (void)</td></tr>
<tr class="separator:ad4f85d486499f82225b244f85091b31e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e4d231ac89510c337fe97fe9e642785"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a8e4d231ac89510c337fe97fe9e642785">sync_commit</a> (void)</td></tr>
<tr class="separator:a8e4d231ac89510c337fe97fe9e642785"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbaa0b80266f70ad98c0bf8f28c533ab"><td class="memTemplParams" colspan="2">template&lt;class Rep , class Period &gt; </td></tr>
<tr class="memitem:afbaa0b80266f70ad98c0bf8f28c533ab"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#afbaa0b80266f70ad98c0bf8f28c533ab">sync_commit</a> (const std::chrono::duration&lt; Rep, Period &gt; &amp;timeout)</td></tr>
<tr class="separator:afbaa0b80266f70ad98c0bf8f28c533ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c846b71478c330d2cad7aa662dfd681"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a6c846b71478c330d2cad7aa662dfd681">add_sentinel</a> (const std::string &amp;host, std::size_t port, std::uint32_t timeout_msecs=0)</td></tr>
<tr class="separator:a6c846b71478c330d2cad7aa662dfd681"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac36640b3f392970c72f5a513a2d61ac7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#ac36640b3f392970c72f5a513a2d61ac7">clear_sentinels</a> (void)</td></tr>
<tr class="separator:ac36640b3f392970c72f5a513a2d61ac7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af607d8c5a20ada35daad251f1b1b2f68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#af607d8c5a20ada35daad251f1b1b2f68">disconnect</a> (bool wait_for_removal=false)</td></tr>
<tr class="separator:af607d8c5a20ada35daad251f1b1b2f68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa98a0593e6e7c04d8d0dd1f292cdce47"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#aa98a0593e6e7c04d8d0dd1f292cdce47">is_connected</a> (void)</td></tr>
<tr class="separator:aa98a0593e6e7c04d8d0dd1f292cdce47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82c8cb23efab71ff00cf2277bba91e90"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a82c8cb23efab71ff00cf2277bba91e90">connect_sentinel</a> (const <a class="el" href="classcpp__redis_1_1sentinel.html#a923e06b5b700c16dffec8a01d2fa9aa4">sentinel_disconnect_handler_t</a> &amp;disconnect_handler=nullptr)</td></tr>
<tr class="separator:a82c8cb23efab71ff00cf2277bba91e90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dfba8240daf7cfa7502f57957cffbda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a1dfba8240daf7cfa7502f57957cffbda">connect</a> (const std::string &amp;host, std::size_t port, const <a class="el" href="classcpp__redis_1_1sentinel.html#a923e06b5b700c16dffec8a01d2fa9aa4">sentinel_disconnect_handler_t</a> &amp;disconnect_handler=nullptr, std::uint32_t timeout_msecs=0)</td></tr>
<tr class="separator:a1dfba8240daf7cfa7502f57957cffbda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2886493b40b00dfafdd3b22dfe28e0c3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a2886493b40b00dfafdd3b22dfe28e0c3">get_master_addr_by_name</a> (const std::string &amp;name, std::string &amp;host, std::size_t &amp;port, bool autoconnect=true)</td></tr>
<tr class="separator:a2886493b40b00dfafdd3b22dfe28e0c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaed03955e468d9f7c3df37376ecafc3a"><td class="memItemLeft" align="right" valign="top"><a id="aaed03955e468d9f7c3df37376ecafc3a"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>ckquorum</b> (const std::string &amp;name, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:aaed03955e468d9f7c3df37376ecafc3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd4ee07b5a17ca15b74d25702687e53a"><td class="memItemLeft" align="right" valign="top"><a id="abd4ee07b5a17ca15b74d25702687e53a"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>failover</b> (const std::string &amp;name, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:abd4ee07b5a17ca15b74d25702687e53a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3c3a6822ebd512217280b0ca1a0f29f"><td class="memItemLeft" align="right" valign="top"><a id="ab3c3a6822ebd512217280b0ca1a0f29f"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>flushconfig</b> (const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:ab3c3a6822ebd512217280b0ca1a0f29f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d08fbc6ae90b93613f0b3c56a6bf1fe"><td class="memItemLeft" align="right" valign="top"><a id="a3d08fbc6ae90b93613f0b3c56a6bf1fe"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>master</b> (const std::string &amp;name, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:a3d08fbc6ae90b93613f0b3c56a6bf1fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed4cacf43432630eb2934ce8b8dec104"><td class="memItemLeft" align="right" valign="top"><a id="aed4cacf43432630eb2934ce8b8dec104"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>masters</b> (const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:aed4cacf43432630eb2934ce8b8dec104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4ae72b60a5a03977cda0d3e1f4ee48d"><td class="memItemLeft" align="right" valign="top"><a id="ad4ae72b60a5a03977cda0d3e1f4ee48d"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>monitor</b> (const std::string &amp;name, const std::string &amp;ip, std::size_t port, std::size_t quorum, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:ad4ae72b60a5a03977cda0d3e1f4ee48d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba0190b2773d4d1f8d5e4c5aac22ce19"><td class="memItemLeft" align="right" valign="top"><a id="aba0190b2773d4d1f8d5e4c5aac22ce19"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>ping</b> (const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:aba0190b2773d4d1f8d5e4c5aac22ce19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee344f7f63bc02d13cb9dce08d48d5d9"><td class="memItemLeft" align="right" valign="top"><a id="aee344f7f63bc02d13cb9dce08d48d5d9"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>remove</b> (const std::string &amp;name, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:aee344f7f63bc02d13cb9dce08d48d5d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11d5f170474aa881df3b6f3cbbde3569"><td class="memItemLeft" align="right" valign="top"><a id="a11d5f170474aa881df3b6f3cbbde3569"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>reset</b> (const std::string &amp;pattern, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:a11d5f170474aa881df3b6f3cbbde3569"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38436712626f27867ecff225eed87a7f"><td class="memItemLeft" align="right" valign="top"><a id="a38436712626f27867ecff225eed87a7f"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>sentinels</b> (const std::string &amp;name, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:a38436712626f27867ecff225eed87a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1579c9c9b8ac3cded0a7d70e709e5e1b"><td class="memItemLeft" align="right" valign="top"><a id="a1579c9c9b8ac3cded0a7d70e709e5e1b"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>set</b> (const std::string &amp;name, const std::string &amp;option, const std::string &amp;value, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:a1579c9c9b8ac3cded0a7d70e709e5e1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4b19659807388d276764f9a79132d00"><td class="memItemLeft" align="right" valign="top"><a id="aa4b19659807388d276764f9a79132d00"></a>
<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>slaves</b> (const std::string &amp;name, const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;reply_callback=nullptr)</td></tr>
<tr class="separator:aa4b19659807388d276764f9a79132d00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adec98cdde0500e44b8fda26a44f14b49"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; <a class="el" href="classcpp__redis_1_1sentinel_1_1sentinel__def.html">sentinel_def</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#adec98cdde0500e44b8fda26a44f14b49">get_sentinels</a> (void) const</td></tr>
<tr class="separator:adec98cdde0500e44b8fda26a44f14b49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62cc14b7795d746cc7d0053c1e0a3abd"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classcpp__redis_1_1sentinel_1_1sentinel__def.html">sentinel_def</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__redis_1_1sentinel.html#a62cc14b7795d746cc7d0053c1e0a3abd">get_sentinels</a> (void)</td></tr>
<tr class="separator:a62cc14b7795d746cc7d0053c1e0a3abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classcpp__redis_1_1sentinel.html">cpp_redis::sentinel</a> is the class providing sentinel configuration. It is meant to be used for sending sentinel-related commands to the remote server and receiving its replies. It is also meant to be used with <a class="el" href="classcpp__redis_1_1client.html">cpp_redis::client</a> and <a class="el" href="classcpp__redis_1_1subscriber.html">cpp_redis::subscriber</a> for high availability (automatic failover if reconnection is enabled). </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="ae1a150ff8787208c47414397a061c9a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1a150ff8787208c47414397a061c9a7">&#9670;&nbsp;</a></span>reply_callback_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::function&lt;void(<a class="el" href="classcpp__redis_1_1reply.html">reply</a>&amp;)&gt; <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">cpp_redis::sentinel::reply_callback_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>callback to be called whenever a reply has been received </p>

</div>
</div>
<a id="a923e06b5b700c16dffec8a01d2fa9aa4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a923e06b5b700c16dffec8a01d2fa9aa4">&#9670;&nbsp;</a></span>sentinel_disconnect_handler_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::function&lt;void(<a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a>&amp;)&gt; <a class="el" href="classcpp__redis_1_1sentinel.html#a923e06b5b700c16dffec8a01d2fa9aa4">cpp_redis::sentinel::sentinel_disconnect_handler_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>handlers called whenever disconnection occurred function takes the sentinel current instance as parameter </p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2ea5a80a9139d5192706988521a2ae34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ea5a80a9139d5192706988521a2ae34">&#9670;&nbsp;</a></span>sentinel() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cpp_redis::sentinel::sentinel </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ctor &amp; dtor </p>
<p>default ctor </p>

</div>
</div>
<a id="af53665f5834dfe5861a6310318ae5169"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af53665f5834dfe5861a6310318ae5169">&#9670;&nbsp;</a></span>sentinel() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cpp_redis::sentinel::sentinel </td>
          <td>(</td>
          <td class="paramtype">const std::shared_ptr&lt; <a class="el" href="classcpp__redis_1_1network_1_1tcp__client__iface.html">network::tcp_client_iface</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>tcp_client</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>custom ctor to specify custom tcp_client</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tcp_client</td><td>tcp client to be used for network communications </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6c846b71478c330d2cad7aa662dfd681"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c846b71478c330d2cad7aa662dfd681">&#9670;&nbsp;</a></span>add_sentinel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a>&amp; cpp_redis::sentinel::add_sentinel </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint32_t&#160;</td>
          <td class="paramname"><em>timeout_msecs</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>add a sentinel definition. Required for <a class="el" href="classcpp__redis_1_1sentinel.html#a1dfba8240daf7cfa7502f57957cffbda">connect()</a> or <a class="el" href="classcpp__redis_1_1sentinel.html#a2886493b40b00dfafdd3b22dfe28e0c3">get_master_addr_by_name()</a> when autoconnect is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>sentinel host </td></tr>
    <tr><td class="paramname">port</td><td>sentinel port </td></tr>
    <tr><td class="paramname">timeout_msecs</td><td>maximum time to connect </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>current instance </dd></dl>

</div>
</div>
<a id="ac36640b3f392970c72f5a513a2d61ac7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac36640b3f392970c72f5a513a2d61ac7">&#9670;&nbsp;</a></span>clear_sentinels()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cpp_redis::sentinel::clear_sentinels </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>clear all existing sentinels. </p>

</div>
</div>
<a id="ad4f85d486499f82225b244f85091b31e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4f85d486499f82225b244f85091b31e">&#9670;&nbsp;</a></span>commit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a>&amp; cpp_redis::sentinel::commit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>commit pipelined transaction that is, send to the network all commands pipelined by calling <a class="el" href="classcpp__redis_1_1sentinel.html#a0df522dbd7debda4e73f616a62d6f5ee">send()</a></p>
<dl class="section return"><dt>Returns</dt><dd>current instance </dd></dl>

</div>
</div>
<a id="a1dfba8240daf7cfa7502f57957cffbda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1dfba8240daf7cfa7502f57957cffbda">&#9670;&nbsp;</a></span>connect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cpp_redis::sentinel::connect </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcpp__redis_1_1sentinel.html#a923e06b5b700c16dffec8a01d2fa9aa4">sentinel_disconnect_handler_t</a> &amp;&#160;</td>
          <td class="paramname"><em>disconnect_handler</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::uint32_t&#160;</td>
          <td class="paramname"><em>timeout_msecs</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Connect to named sentinel</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>host to be connected to </td></tr>
    <tr><td class="paramname">port</td><td>port to be connected to </td></tr>
    <tr><td class="paramname">timeout_msecs</td><td>maximum time to connect </td></tr>
    <tr><td class="paramname">disconnect_handler</td><td>handler to be called whenever disconnection occurs </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a82c8cb23efab71ff00cf2277bba91e90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82c8cb23efab71ff00cf2277bba91e90">&#9670;&nbsp;</a></span>connect_sentinel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cpp_redis::sentinel::connect_sentinel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcpp__redis_1_1sentinel.html#a923e06b5b700c16dffec8a01d2fa9aa4">sentinel_disconnect_handler_t</a> &amp;&#160;</td>
          <td class="paramname"><em>disconnect_handler</em> = <code>nullptr</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Connect to 1st active sentinel we find. Requires <a class="el" href="classcpp__redis_1_1sentinel.html#a6c846b71478c330d2cad7aa662dfd681">add_sentinel()</a> to be called first will use timeout set for each added sentinel independently</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">disconnect_handler</td><td>handler to be called whenever disconnection occurs </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af607d8c5a20ada35daad251f1b1b2f68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af607d8c5a20ada35daad251f1b1b2f68">&#9670;&nbsp;</a></span>disconnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cpp_redis::sentinel::disconnect </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wait_for_removal</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>disconnect from redis server</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">wait_for_removal</td><td>when sets to true, disconnect blocks until the underlying TCP client has been effectively removed from the io_service and that all the underlying callbacks have completed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2886493b40b00dfafdd3b22dfe28e0c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2886493b40b00dfafdd3b22dfe28e0c3">&#9670;&nbsp;</a></span>get_master_addr_by_name()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cpp_redis::sentinel::get_master_addr_by_name </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t &amp;&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>autoconnect</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Used to find the current redis master by asking one or more sentinels. Use high availablity. Handles <a class="el" href="classcpp__redis_1_1sentinel.html#a1dfba8240daf7cfa7502f57957cffbda">connect()</a> and <a class="el" href="classcpp__redis_1_1sentinel.html#af607d8c5a20ada35daad251f1b1b2f68">disconnect()</a> automatically when autoconnect=true This method is synchronous. No need to call <a class="el" href="classcpp__redis_1_1sentinel.html#a8e4d231ac89510c337fe97fe9e642785">sync_commit()</a> or process a reply callback. Call <a class="el" href="classcpp__redis_1_1sentinel.html#a6c846b71478c330d2cad7aa662dfd681">add_sentinel()</a> before using when autoconnect==true</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>sentinel name </td></tr>
    <tr><td class="paramname">host</td><td>sentinel host </td></tr>
    <tr><td class="paramname">port</td><td>sentinel port </td></tr>
    <tr><td class="paramname">autoconnect</td><td>autoconnect we loop through and connect/disconnect as necessary to sentinels that were added using <a class="el" href="classcpp__redis_1_1sentinel.html#a6c846b71478c330d2cad7aa662dfd681">add_sentinel()</a>. Otherwise we rely on the call to connect to a sentinel before calling this method. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if a master was found and fills in host and port output parameters, false otherwise </dd></dl>

</div>
</div>
<a id="adec98cdde0500e44b8fda26a44f14b49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adec98cdde0500e44b8fda26a44f14b49">&#9670;&nbsp;</a></span>get_sentinels() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::vector&lt;<a class="el" href="classcpp__redis_1_1sentinel_1_1sentinel__def.html">sentinel_def</a>&gt;&amp; cpp_redis::sentinel::get_sentinels </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>sentinels </dd></dl>

</div>
</div>
<a id="a62cc14b7795d746cc7d0053c1e0a3abd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62cc14b7795d746cc7d0053c1e0a3abd">&#9670;&nbsp;</a></span>get_sentinels() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classcpp__redis_1_1sentinel_1_1sentinel__def.html">sentinel_def</a>&gt;&amp; cpp_redis::sentinel::get_sentinels </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>sentinels (non-const version) </dd></dl>

</div>
</div>
<a id="aa98a0593e6e7c04d8d0dd1f292cdce47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa98a0593e6e7c04d8d0dd1f292cdce47">&#9670;&nbsp;</a></span>is_connected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cpp_redis::sentinel::is_connected </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>whether we are connected to the redis server or not </dd></dl>

</div>
</div>
<a id="a0df522dbd7debda4e73f616a62d6f5ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0df522dbd7debda4e73f616a62d6f5ee">&#9670;&nbsp;</a></span>send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a>&amp; cpp_redis::sentinel::send </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>sentinel_cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcpp__redis_1_1sentinel.html#ae1a150ff8787208c47414397a061c9a7">reply_callback_t</a> &amp;&#160;</td>
          <td class="paramname"><em>callback</em> = <code>nullptr</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>send the given command the command is actually pipelined and only buffered, so nothing is sent to the network please call <a class="el" href="classcpp__redis_1_1sentinel.html#ad4f85d486499f82225b244f85091b31e">commit()</a> to flush the buffer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sentinel_cmd</td><td>command to be sent </td></tr>
    <tr><td class="paramname">callback</td><td>callback to be called when reply is received for this command </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>current instance </dd></dl>

</div>
</div>
<a id="a8e4d231ac89510c337fe97fe9e642785"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e4d231ac89510c337fe97fe9e642785">&#9670;&nbsp;</a></span>sync_commit() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a>&amp; cpp_redis::sentinel::sync_commit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>same as <a class="el" href="classcpp__redis_1_1sentinel.html#ad4f85d486499f82225b244f85091b31e">commit()</a>, but synchronous will block until all pending commands have been sent and that a reply has been received for each of them and all underlying callbacks completed</p>
<dl class="section return"><dt>Returns</dt><dd>current instance </dd></dl>

</div>
</div>
<a id="afbaa0b80266f70ad98c0bf8f28c533ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbaa0b80266f70ad98c0bf8f28c533ab">&#9670;&nbsp;</a></span>sync_commit() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Rep , class Period &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcpp__redis_1_1sentinel.html">sentinel</a>&amp; cpp_redis::sentinel::sync_commit </td>
          <td>(</td>
          <td class="paramtype">const std::chrono::duration&lt; Rep, Period &gt; &amp;&#160;</td>
          <td class="paramname"><em>timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>same as sync_commit, but with a timeout will simply block until it completes or timeout expires</p>
<dl class="section return"><dt>Returns</dt><dd>current instance </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>includes/cpp_redis/core/<a class="el" href="sentinel_8hpp_source.html">sentinel.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
